import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router'
import HomeView from '../views/AboutView'
import LoginView from '../views/LoginView'
import NotFound from '../views/404'
import type { RouteRecordDto } from '@/api/login/types'
// import TaskRecordList from '@/views/TaskRecordListView'
// import EnterpriseDetail from '@/views/EnterpriseDetailView'




const router = createRouter({
    history: createWebHashHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: '/login',
            name: 'login',
            meta: {
                fullscreen: true,
                noCache: true
            },
            component: () => import('../views/LoginView')
        },
        // {
        //     path: '/',
        //     name: 'Home',
        //     component: HomeView,
        //     meta: {
        //         keepAlive: true
        //     }
        // },
        {
            path: ''
        },
        {
            path: '/:pathMatch(.*)',
            name: 'NotFound',
            meta: {
                noCache: true
            },
            component: NotFound,
            hidden: true
        },
    ] as RouteRecordDto[]
})

export const noMathPage = { path: '/:pathMatch(.*)', redirect: '/404', component: NotFound, hidden: true } as RouteRecordDto

export default router
